package moh.s2.s2service.impl;

import java.util.List;

import moh.s2.s2dao.PropertiesDAO;
import moh.s2.s2entity.Properties;
import moh.s2.s2service.PropertiesService;

//@Service
public class PropertiesServiceImpl implements PropertiesService {
	// @Autowired
	private PropertiesDAO propertiesDAO;

	public void add(Properties properties) throws Exception {
		propertiesDAO.add(properties);
	}

	public void update(Properties properties) throws Exception {
		propertiesDAO.update(properties);
	}

	public void delete(Properties properties) throws Exception {
		propertiesDAO.delete(properties);

	}

	public List<Properties> list() throws Exception {
		return propertiesDAO.list();
	}

	public Properties findByKey(String key) throws Exception {
		return propertiesDAO.findByKey(key);
	}

	public Properties findByValue(String value) throws Exception {
		return propertiesDAO.findByValue(value);
	}

	public PropertiesDAO getPropertiesDAO() {
		return propertiesDAO;
	}

	public void setPropertiesDAO(PropertiesDAO propertiesDAO) {
		this.propertiesDAO = propertiesDAO;
	}

}
